﻿/*弹出模式对话框*/
function popWin(selectAction, Title) {
    setTimeout(
                  function() {
                      ymPrompt.win({ message: selectAction,
                          width: 800,
                          height: 650,
                          title: Title,
                          handler: null,
                          maxBtn: false,
                          minBtn: false,
                          iframe: true
                      });
                  }, 50);
    return false;
}
/*选择单位弹出对话框*/
function winOperDWSelect(selectAction, Title) {
    var dwmc = "";
    if ($("#ctl00_MainContent_txtDWMC").length) {
        dwmc = $("#ctl00_MainContent_txtDWMC").val();
    }
    selectAction = selectAction + "&DWMC=" + $("#ctl00_MainContent_txtDWMC").val();
    popWin(selectAction, Title);
}
/*选择消防控制室弹出对话框*/
function winOperXKSSelect(selectAction, Title) {
    var dwmc = "";
    if ($("#ctl00_MainContent_txtDWMC").length) {
        dwmc = $("#ctl00_MainContent_txtDWMC").val();
    }
    var xksbh = "";
    if ($("#ctl00_MainContent_txtXKSBH").length) {
        xksbh = $("#ctl00_MainContent_txtXKSBH").val();
    }
    selectAction = selectAction + "&DWMC=" + dwmc +
"&XKSBH=" + xksbh;
    popWin(selectAction, Title);
}
/*取消单位关联*/
function removeDW() {
    $("#ctl00_MainContent_HidDWID").val("");
    $("#ctl00_MainContent_HidDWXFGX").val("");
    $("#ctl00_MainContent_selectDW").html("单位关联");
    $("#ctl00_MainContent_removeDW").css("display", "none");
    return false;
}

/*页面初始化如果没有消控室则是否参与值班设置为不可写*/
$(document).ready(function() {
    if ($("#ctl00_MainContent_chkSFYXKS_F").attr("checked")) {
        ;
    }
});

